package com.canvas.service.search;

import lombok.Data;

import java.io.Serializable;

/**
 * @Author: 宗恣
 * @Date: 2018/9/12 0012 15:40
 */
@Data
public class HouseIndexMessage implements Serializable {

    public static final String INDEX = "index";
    public static final String REMOVE = "remove";

    public static final int MAX_RETRY = 3;
    private static final long serialVersionUID = 6900705864534750917L;

    private Long houseId;

    private String operation;

    private String messageId;

    private int retry = 0;

    /**
     * 默认构造器 防止jackson序列化失败
     */
    public HouseIndexMessage() {
    }

    public HouseIndexMessage(Long houseId, String operation, int retry) {
        this.houseId = houseId;
        this.operation = operation;
        this.retry = retry;
    }

}
